package enduringLink.call;

import enduringLink.MyProxy;
import enduringLink.RequestHandler;
import io.netty.channel.Channel;
import local.LocalInstance;

public class MyStartSelect implements StartSelect{
    @Override
    public void select() {
        System.out.println("开始查询......");
        selectQuantitySum();
    }

    public void selectQuantitySum(){
//        System.out.println("before : " + LocalInstance.getQuantitySum());
        Channel channel = RequestHandler.getChannel();
        MyProxy myProxy = new MyProxy(channel);
        QuantityHandle quantityHandle = myProxy.proxyGet(QuantityHandle.class);
        quantityHandle.addQuantity(LocalInstance.getQuantitySum());
    }
}
